package com.lct.create;

import java.util.Scanner;

public class ArrayTest6 {
    public static void main(String[] args) {
        //6个评委打分，求平均数
        double[] scores = new double[6];

        Scanner sc = new Scanner(System.in);

        for (int i = 0; i < 6; i++) {
            System.out.println("请输入第" + (i+1) +"个评委的打分");
            double score = sc.nextDouble();
            scores[i] = score;
        }


        double sum = 0;
        for (int i = 0; i < scores.length; i++) {
            sum += scores[i];
        }

        System.out.println("最终的分数为" + (sum / scores.length) + "分");
    }
}
